package com.example.string;

import java.util.Arrays;

public class ArrayTest2 {
    public static void main(String[] args) {
        String str = "丁鹤峰|010032,朱然|10000295,陈杰|10000335,赵凤兰|10002930,宋园园|010036";
        Arrays.asList(str.split(",")).stream().limit(3).forEach(e -> {
            System.out.println(e.substring(0, e.indexOf("|")));
            System.out.println(e.substring(e.indexOf("|")).replaceAll("\\|",""));
            System.out.println("|10000335".replaceAll("\\|",""));
        });
    }
}
